.\" $Id: PAPI_reset.3,v 1.13 2004/10/04 02:16:26 jthomas Exp $
.TH PAPI_reset 3 "September, 2004" "PAPI Programmer's Reference" "PAPI"

.SH NAME
PAPI_reset \- reset the hardware event counts in an event set

.SH SYNOPSIS
.B C Interface
.nf
.B #include <papi.h>
.BI "int\ PAPI_reset (int " EventSet ");"
.fi
.B Fortran Interface
.nf
.B #include "fpapi.h"
.BI PAPIF_reset(C_INT\  EventSet,\  C_INT\  check )
.fi

.SH DESCRIPTION
.B PAPI_reset()
zeroes the values of the counters contained in 
.IR EventSet "."
This call assumes an initialized PAPI library and
a properly added event set.

.SH ARGUMENTS
.I "EventSet"
--  an integer handle for a PAPI event set as created by
.BR "PAPI_create_eventset" (3)

.SH RETURN VALUES
On success, this function returns
.B "PAPI_OK."
 On error, a non-zero error code is returned.

.SH ERRORS
.TP
.B "PAPI_ESYS"
A system or C library call failed inside PAPI, see the 
.I "errno"
variable.
.TP
.B "PAPI_ENOEVST"
The EventSet specified does not exist.

.SH EXAMPLES
.nf         
.if t .ft CW
if (PAPI_reset(EventSet) != PAPI_OK)
  handle_error(1);
.if t .ft P
.fi

.SH BUGS
This function has no known bugs.

.SH SEE ALSO
.BR PAPI_create_eventset "(3), " PAPI "(3)," PAPIF "(3)"
